package com.xy.job.core.job

import com.xy.job.admin.Application
import com.xy.job.admin.core.notify.NotifierSenders
import com.xy.job.admin.core.notify.NotifyChannel
import com.xy.job.admin.core.notify.NotifyContext
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import kotlin.test.Test

@SpringBootTest(classes = [Application::class])
class NotifierSendersTests {

    @Autowired
    lateinit var emailSender: NotifierSenders.Email

    @Test
    fun dingTalkRobotTest() {

    }

    @Test
    fun emailTest() {
        emailSender.notify(
            config = NotifyChannel.Email(receivers = listOf("17348876305@163.com")),
            context = NotifyContext.Email(title = "test", content = "hello world"),
        )
    }
}